package cn.changeforyou.web.cloud.auth.service.impl;

import cn.changeforyou.web.cloud.auth.entity.RoleInfo;
import cn.changeforyou.web.cloud.auth.mapper.RoleInfoMapper;
import cn.changeforyou.web.cloud.auth.service.RoleInfoService;
import cn.changeforyou.web.plugin.page.MybatisPlusPageUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class RoleInfoServiceImpl extends ServiceImpl<RoleInfoMapper, RoleInfo>
    implements RoleInfoService{

    @Override
    public Page<RoleInfo> queryRoleByPage() {
        Page<RoleInfo> pageInfo = MybatisPlusPageUtil.getPageInfo(this.getClass());
        return this.page(pageInfo);
    }

    @Override
    public List<RoleInfo> queryEnabledRoles() {
        return this.list();
    }
}




